<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function () {
    return view('welcome');
});

Auth::routes();

Route::get('/home', 'HomeController@index')->name('home');

Route::middleware('auth')->group(function ($route) {
    $route->get('user/edit', 'User\UserController@edit')->name('user.edit');
    $route->patch('user', 'User\UserController@store')->name('user.store');
    $route->get('uploads', 'Video\VideoUploadController@index')->name('video.upload');
    $route->post('uploads', 'Video\VideoUploadController@store')->name('video.upload.store');
    $route->post('videos', 'Video\VideoController@store')->name('video.store');
    $route->put('videos', 'Video\VideoController@update')->name('video.update');

    $route->get('make', 'HomeController@make');
    $route->post('make', 'HomeController@store')->name('make.file');
});
